const calculate_age = (age_1: any) => {
  if (age_1) {
    var today = new Date();

    var birthDate = new Date(age_1);
    var age_now = today.getFullYear() - birthDate.getFullYear();
    var m = today.getMonth() - birthDate.getMonth();

    if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) {
      age_now--;
    }
    // console.log(age_now);
    return age_now;
  } else {
    return '-';
  }
};
export default calculate_age;
